package org.jiajie.coffeecodes.concurrent.pattern.per.message;


/**
 * 由Host分发请求，每一个请求分发一个新的线程进行处理
 *
 * @author jay
 */
public class Host {
    private final Helper helper = new Helper();

    public void request(final int count, final char c) {
        System.out.println("    request(" + count + ", " + c +") BEGIN");
        new Thread(){
            @Override
            public void run() {
                helper.handle(count, c);
            }
        }.start();
        System.out.println("    request(" + count + ", " + c +") END");
    }
}
